package com.simple.business.domain.enumeration;

public enum ThirdAuthenticationEnum {
    WEI_XIN("weixin"),
    WEI_XIN_MINIPROGRAM("weixin_miniprogram"),
    WEI_XIN_MP("weixin_mp"),

    PHONE("phone"),
    EMAIL("email"),
    DIRECT("direct")
    ;

    private String providerName;

    ThirdAuthenticationEnum(String providerName) {
        this.providerName = providerName;
    }

    public String getProviderName() {
        return providerName;
    }

    public void setProviderName(String providerName) {
        this.providerName = providerName;
    }

    public static ThirdAuthenticationEnum getEnum(String providerName){
        for (ThirdAuthenticationEnum value : ThirdAuthenticationEnum.values()) {
            if(value.providerName.equals(providerName)){
                return value;
            }
        }
        return null;
    }
}
